package com.situ.bean;
import java.util.List;

public class PageResult<T> {

    private List<T> data; // 当前页的数据
    private int page; // 当前页码
    private int pageSize; // 每页显示的数据条数
    private int totalItems; // 总数据量
    private int totalPages; // 总页数

    // 构造方法
    public PageResult(List<T> data, int page, int pageSize, int totalItems, int totalPages) {
        this.data = data;
        this.page = page;
        this.pageSize = pageSize;
        this.totalItems = totalItems;
        this.totalPages = totalPages;
    }

    // Getters and Setters
    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalItems() {
        return totalItems;
    }

    public void setTotalItems(int totalItems) {
        this.totalItems = totalItems;
    }

    public int getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(int totalPages) {
        this.totalPages = totalPages;
    }
}